<template>
  <div id="selectionMethod">
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane label="办理入职" name="first">办理入职</el-tab-pane>
      <el-tab-pane label="扫码入职" name="middle">扫码入职</el-tab-pane>
      <el-tab-pane label="审批入职" name="end">
        <div class="views" id="iframe-container" style="padding: 0; overflow: hidden" v-loading="loading">
          <iframe :src="`${url}?appKey=${getTokenParams.appKey}&formId=${formId}&credentialId=${getTokenParams.credentialId}&userId=${getTokenParams.userId}&appSecret=${getTokenParams.appSecret}&query=${query}&random=${random}`" style="width: 100%; height: 99.45%; background: #ffffff" frameborder="0"></iframe>
        </div>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>
<script>
// import common from "../../../examineApproveCloud/mixins/common";
import common from "../../../examineApproveCloud/mixins/common";
export default {
  name: "selectionMethod",
  mixins: [common],
  data() {
    return {
      activeName: "first",
      formId: "",
      query: "initiateApproval", //审批页面
    };
  },
  async mounted() {
    const { data } = await this.$api.optionsManage.GetApproveFormId({ type: this.urlToBtn[this.$route.name].id });
    this.formId = data.data;
  },
  methods: {
    handleClick(tab, event) {
      console.log(tab, event);
    },
  },
};
</script>
